import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-16
 * Time: 20:33
 */
public class Test2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        for(int i = 0; i < k; i++) {
            if(haveEven(a)) {
                int index = findMaxEvenIndex(a);
                a[index] /= 2;
            }else {
                break;
            }

        }
        int sum = 0;
        for(int i = 0; i < a.length; i++) {
            sum += a[i];
        }
        System.out.println(sum);
    }

    private static int findMaxEvenIndex(int[] a) {
        int max = 0;
        int index = 0;
        for(int i = 0; i < a.length; i++) {
            if(max < a[i]) {
                max = a[i];
                index = i;
            }
        }
        return index;
    }
    private static boolean haveEven(int[] a) {
        boolean flag = false;
        for(int i = 0; i < a.length; i++) {
            if(a[i] % 2 == 0) {
                flag = true;
                break;
            }
        }
        return flag;
    }
}
